<%@ page language="java" import="java.util.*,java.sql.*"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	String username = (String) request.getParameter("username");
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>联系人详细信息</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

<script language="javascript" type="text/javascript"
	src="/Login/My97DatePicker/WdatePicker.js"></script>
</head>

<body>
	<%
		Class.forName("com.mysql.jdbc.Driver").newInstance();
		String url = "jdbc:mysql://localhost:3306/graduatedesign";
		String user = "root";
		String password = "root";
		Connection conn = DriverManager.getConnection(url, user, password);
		Statement sm = conn.createStatement();
		ResultSet rs = sm.executeQuery("select user.username,name,sex,age,tel,email from userinfo,user  where user.username=userinfo.username and user.username='"+ username+"'");
	%>
	<%
		while (rs.next()) {
	%>
	
		<table width="100%" border="0" cellpadding="0" cellspacing="1"
			bgcolor="#BBD3EB">

			<tr>
				<td height="27" align="center"
					background="/OA/admin/images/index1_72.gif" bgcolor="#FFFFFF">用户名</td>
				<td bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;<input type="text"
					id="username" name="username" value="<%=username%>"
					disabled=disabled /></td>
			</tr>
			<tr>
				<td height="27" align="center"
					background="/OA/admin/images/index1_72.gif" bgcolor="#FFFFFF">姓名</td>
				<td bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;<input type="text"
					id="xingming" name="xingming" value="<%=rs.getString(2)%>" disabled=disabled /></td>
			</tr>
			<tr>
				<td height="27" align="center"
					background="/OA/admin/images/index1_72.gif" bgcolor="#FFFFFF">性别</td>
				<td bgcolor="#FFFFFF">&nbsp;&nbsp; <select id="sex"
					name="sex" disabled=disabled >
						<option value="男"<%if(rs.getString(3).equals("男")){out.print(" selected=\"true\"");}%>>男</option>
						<option value="女"<%if(rs.getString(3).equals("女")){out.print(" selected=\"true\"");}%>>女</option>
				</select>
				</td>
			</tr>
			<tr>
				<td height="27" align="center"
					background="/OA/admin/images/index1_72.gif" bgcolor="#FFFFFF">年龄</td>
				<td bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;<input type="text"
					id="age" name="age" value="<%=rs.getString(4)%>" disabled=disabled /></td>
			</tr>
			<tr>
				<td height="27" align="center"
					background="/OA/admin/images/index1_72.gif" bgcolor="#FFFFFF">电话</td>
				<td bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;<input type="text"
					id="tel" name="tel" value="<%=rs.getString(5)%>" disabled=disabled /></td>
			</tr>
			<tr>
				<td height="27" align="center"
					background="/OA/admin/images/index1_72.gif" bgcolor="#FFFFFF">EMAIL</td>
				<td bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;<input type="text"
					id="email" name="email" value="<%=rs.getString(6)%>" disabled=disabled /></td>
			</tr>
			<tr>
				<td height="27" align="center"
					background="/OA/admin/images/index1_72.gif" bgcolor="#FFFFFF"></td>
				<td bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;<input type="button" name="Submit" onclick="javascript:history.back(-1);" value="返回上一页">
			</tr>
			
		</table>

	<%
		break;}
	%>
</body>
</html>